<?php

namespace app\validate;

use core\validate\ValidateBase;

class UserIntegralRule extends ValidateBase
{

    protected $rule =   [
        'hookident' => 'require',
        'addsub'       => 'require|number',
        'integral'     => 'require|number|min:1',
        'daylimit'     => 'require|number|min:1',
        'alllimit'     => 'require|number|min:1',
    ];

    protected $message  =   [
        'hookident.require' => '事件钩子必填',
        'addsub.require'       => '添加/扣除必填',
        'addsub.number'        => '添加/扣除格式错误',
        'integral.require'     => '积分数必填',
        'integral.number'      => '积分数格式错误',
        'integral.min'         => '积分数最小为1',
        'daylimit.require'     => '每日限额必填',
        'daylimit.number'      => '每日限额格式错误',
        'daylimit.min'         => '每日限额最小为0',
        'alllimit.require'     => '总限额必填',
        'alllimit.number'      => '总限额格式错误',
        'alllimit.min'         => '每日限额最小为0',

    ];
}
